/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Arrays;
import java.util.stream.Stream;

/**
 * <p>Project: javaseapp - Switch1
 * <p>Powered by webrx On 2021-07-29 17:20:48
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 16
 */
public class ForIn {
    public static void main(String[] args) {
        //for in  foreach for of 循环集合 数组
        int[] nums = {10, 20, 30};

        for(int i : Stream.of(1,2,3,4,5,6).toList()){
            System.out.println(i);
        }

        for (int am : nums) {
            System.out.println(am);
            break;
        }

        for(String s : new String[]{"java","php","python"}){
            System.out.println(s);
        }

        for(char c : "javascript".toCharArray()){
            System.out.println(c);
        }

        System.out.println("--------------------------------");
        for (String value : System.getenv().values()) {
            System.out.println(value);
        }

    }
}
